package com.mera.tektronix.csviewer.filters

import org.apache.commons.logging.LogFactory

class ApplicationFilters {
	private static final log = LogFactory.getLog(ApplicationFilters.class)
	
    def filters = {
        logFilter(controller:'*', action:'*') {
			before = {
				if (!log.debugEnabled) return true

				long start = System.currentTimeMillis()

				log.debug "'$request.servletPath'/'$request.forwardURI', Method: $request.method, " +
						  "Ajax: $request.xhr, " +
						  "params: ${new TreeMap(params)}"

				return true
			}
        }
    }
}
